package com.spzx.channel.controller;

import com.spzx.channel.domain.vo.ItemVo;
import com.spzx.channel.service.ItemService;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "H5商品详细接口")
@RestController
@RequestMapping("/item")
public class ItemController {

    @Autowired
    private ItemService itemService;

    @Operation(summary = "商品详细信息")
    @GetMapping("/{skuId}")
    public AjaxResult getItemBySkuId(@PathVariable Long skuId){

        ItemVo itemVo=itemService.getItemBySkuId(skuId);
        return AjaxResult.success(itemVo);
    }
}
